﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Runtime.InteropServices;
using Dtf.Core.Remoting;
using ResourceManager;

namespace Dtf.Core.Resources
{
    public class Win32DialogProvider : ResourceProvider
    {

        public Win32DialogProvider(string resourceTypeName)
            : base(resourceTypeName)
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileName"></param>
        /// <param name="idTokens">;Report a call issue;Win32DialogString;LCLang.dll;51600</param>
        /// <returns></returns>
        public override string ExtractString(string fileName, string[] tokens)
        {
            if (tokens.Length ==0  || tokens.Length != 1)
            {
                throw new ResourceKeyException();
            }

            return new ResourceFetcher().GetDialogNameFromResources(null, fileName, tokens[0]);
            
        }

    }
}
